Skip to content

feat: Apply changes from AppLock#1971

Open
baillyjamy wants to merge 1 commit intomainfrom
apply-applock-change
Open

feat: Apply changes from AppLock#1971
baillyjamy wants to merge 1 commit intomainfrom
apply-applock-change

Conversation

@baillyjamy
Copy link
Contributor

Apply changes of AppLock on core : Infomaniak/android-core#715

Depends on Infomaniak/android-core#715

@baillyjamy baillyjamy requested a review from a team March 4, 2026 15:59
@github-actions github-actions bot added the dependent This MR depends on another PR label Mar 4, 2026
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

This PR/issue depends on:

@baillyjamy baillyjamy force-pushed the apply-applock-change branch from b8c68c8 to 0f38cca Compare March 5, 2026 08:04
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 5, 2026

@sirambd sirambd requested a review from Copilot March 9, 2026 09:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Drive to use the new AppLock APIs introduced in the core submodule (replacing LockActivity usage with AppLockManager / AppLockViewActivity).

Changes:

  • Replace legacy LockActivity calls with AppLockManager equivalents (biometric availability, unlock, scheduling).
  • Update lock screen activity class reference to AppLockViewActivity (including manifest).
  • Bump Core submodule to a commit containing the AppLock refactor.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/src/main/java/com/infomaniak/drive/ui/menu/settings/SettingsFragment.kt Switch biometrics check from LockActivity to AppLockManager.
app/src/main/java/com/infomaniak/drive/ui/menu/settings/AppSecuritySettingsActivity.kt Migrate unlock + helper import to new AppLock API.
app/src/main/java/com/infomaniak/drive/ui/SaveExternalFilesActivity.kt Use AppLockManager.scheduleLockIfNeeded with AppLockViewActivity.
app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt Use AppLockManager.scheduleLockIfNeeded with AppLockViewActivity (plus new import).
app/src/main/AndroidManifest.xml Point lock activity declaration at AppLockViewActivity.
Core Updates core submodule revision to include AppLock changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

import kotlinx.coroutines.withContext
import javax.inject.Inject
import kotlin.coroutines.resume
import kotlin.jvm.java
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import kotlin.jvm.java is typically not needed to use ::class.java on Android/Kotlin JVM (and may be flagged as an unused import by lint/ktlint if it isn't required by your compiler settings). Consider removing it unless this file genuinely needs the explicit import.

Suggested change
import kotlin.jvm.java

Copilot uses AI. Check for mistakes.
Comment on lines +207 to 211
AppLockManager.scheduleLockIfNeeded(
targetActivity = this,
lockActivityCls = AppLockViewActivity::class.java,
isAppLockEnabled = { AppSettings.appSecurityLock }
)
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new lockActivityCls = AppLockViewActivity::class.java parameter is now required at call sites and is repeated (also in SaveExternalFilesActivity). To reduce duplication and avoid future drift if the lock activity changes again, consider centralizing this into a shared constant (e.g., in AppLockManager/AppSettings) or a small wrapper method in your app module.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependent This MR depends on another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants